package com.mew.common.rest.gold;

import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.ToString;

@Data
@ToString
public class TranRequest extends ZebraBaseMessage<TranRequest> {

    public long toUid;
    public long goldNumber;

    @Override
    public void write(ByteBuf b) {
        writeLong(b,toUid);
        writeLong(b,goldNumber);
    }

    @Override
    public TranRequest read(ByteBuf byteBuf) {
        TranRequest tranRequest = new TranRequest();
        tranRequest.toUid = readLong(byteBuf);
        tranRequest.goldNumber = readLong(byteBuf);

        return tranRequest;
    }
}
